package com.qinxueit.admin.controller;

import com.qinxueit.admin.entity.Article;
import com.qinxueit.admin.entity.Login;
import com.qinxueit.core.utils.Result;
import com.sun.deploy.net.HttpResponse;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class LoginController {

    @GetMapping("/login")
    public ModelAndView login(Model model) {
        return Result.view("/login");
    }

    @PostMapping("/signin")
    public Result signin(String username, String password) {
        System.out.println(username);
        System.out.println(password);
        String url = "/article/list";
        Article article = new Article();
        return Result.success(200,"成功",article);
    }

    @GetMapping("/captchaImage")
    public Result captchaImage(){

        return Result.success(200);
    }
}
